A CALL to PEEK and POKE
By Grant Kwai
Copyright (c) 1991 Apple Users' Group, Sydney
Republished from Applecations, a publication of the Apple Users' Group, Sydney, Australia.
Over the past several months, I have been writing various articles on some of the many PEEKs, POKEs, and CALLs you can implement on the Apple //. Here are a few more which you can try on your Apple // computer.
PEEK(-16384) :Last key entered.
POKE -16368,0 :Clears the Keyboard Strobe.
POKE 48,x :Sets colours for low res graphics.
POKE 50,255 :Sets text display to NORMAL.
POKE 50,63 :Sets text display to INVERSE.
POKE 50,127 :Sets text display to FLASH.
POKE 50,x :Try it, and see what you get!
CALL -167 :Enter the monitor and reset.
CALL -259 :Read from a tape.
CALL -458 :Verify.
CALL -657 :Allow input of colons and commas.
CALL -912 :Scroll one line.
CALL -922 :Carriage return.
CALL -1002 :Moves the cursor left one position.
CALL -1036 :Moves the cursor right one position.
CALL -1233 :TEXT
These are for Dos 3.3 and will not work under ProDOS:
CALL 42350 :Catalog the disk in the disk drive.
POKE 44793,11 :Prevents normal save of dos.
PEEK(46063) :Returns number of tracks DOS 3.3 is using (normally 35)
Below is a way of figuring out what type of error you have. You might like to implement it in one of your programs, to make it more 'user friendly'.
PEEK(222) :This will return a number, which is in fact the code number for an error in an ONERR message.
Number: Meaning:
0 NEXT without FOR
1 Language not available
2,3 Range error
4 Write protected
5 End of Data
6 File not found
7 Volume Mismatch
8 I/O error
9 Disk full
10 Locked file
11 DOS syntax error
12 No buffers available
13 File type mismatch
14 Program too large
15 Not direct command
16 BASIC syntax error
22 RETURN Without GOSUB error
42 BASIC out of DATA
53 Illegal quantity
69 Overflow error
77 Out of memory
90 Undefined statement
107 Bad subscript
120 Redimensioned array
133 Division by Zero
163 Type mismatch
176 String too long
191 Formula too complex
224 Undefined function
254 Bad input response
255 Control-C break
If there are any AUG members who may have missed out on my previous PEEKS, POKES and CALL articles and would like a copy, you can obtain a copy directly from me by sending a disk (Apple 5.25" only, or IBM 5.25" or 3.5") in a postpack, making sure you include return postage. I will then copy the files to your disk and return it as soon as possible. Write to me at PO Box 74, Telopea NSW 2117.

THIS CONTENT COPYRIGHT © 2007, APPLE MACINTOSH USERS' GROUP, SYDNEY
Permission has been obtained to make this material available on the Internet.

Permission is hereby granted for non-profit user groups to republish this content.
PLEASE CREDIT THE AUTHOR AND THE SOURCE: Applecations, publication of the Apple Users' Group, Sydney, Australia

THIS PAGE COPYRIGHT © 2007, ANDREW ROUGHAN